package org.example.springboot.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

/**
 * 设备报警配置
 *
 * @author Fz
 * @since 1.0.0 2024-08-01
 */

@Data
@TableName("col_device_alarm_set")
public class ColDeviceAlarmSet {

    /**
     * id
     */
    @IsKey
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 电量最低值
     */
    @Column(name = "ele_min", comment = "电量最低值")
    private Float eleMin;

    /**
     * 电压最低值
     */
    @Column(name = "vol_min", comment = "电压最低值")
    private Float volMin;

    /**
     * 信号最低值
     */
    @Column(name = "sig_min", comment = "信号最低值")
    private Float sigMin;

    /**
     * sim卡提前报警天数
     */
    @Column(name = "sim_adv", comment = "sim卡提前报警天数")
    private Integer simAdv;

    /**
     * 设备离线，心跳持续未接收分钟数
     */
    @Column(name = "online", comment = "设备离线，心跳持续未接收分钟数")
    private Integer online;

    /**
     * 租户编码
     */
    @Column(name = "tenant_code", comment = "租户编码")
    private Long tenantCode;

    /**
     * 创建者
     */
    @Column(name = "creator", comment = "创建者")
    private Long creator;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_date", comment = "创建时间", type = MySqlTypeConstant.DATETIME, length = 100)
    private Date createDate;

    /**
     * 修改者
     */
    @Column(name = "updater", comment = "修改者")
    private Long updater;

    /**
     * 最后更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(name = "update_date", comment = "更新时间", type = MySqlTypeConstant.DATETIME, length = 36)
    private Date updateDate;

    /**
     * 删除标志 0 正常 1 已删除
     */
    @Column(name = "del_flag", comment = "删除标志 0 正常 1 已删除", length = 2, type = MySqlTypeConstant.TINYINT)
    private Integer delFlag;

    /**
     * 删除者
     */
    @Column(name = "deleter", comment = "删除者")
    private Long deleter;

    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @Column(name = "delete_date", type = MySqlTypeConstant.DATETIME, comment = "删除时间")
    private Date deleteDate;

}